﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AgentPage/CampusAgent.master" AutoEventWireup="true" CodeFile="AgentInfo.aspx.cs" Inherits="AgentPage_AgentInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="AgentInfo.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div id="content">
<div id="left">
<ul>
	<li>
        <asp:LinkButton ID="LinkButton_userinfo" runat="server" 
            onclick="LinkButton_userinfo_Click" >用户信息</asp:LinkButton></li>
        <li>
        <asp:LinkButton ID="LinkButton_modifypsw" runat="server" 
                onclick="LinkButton_modifypsw_Click">修改密码</asp:LinkButton></li>
</ul>
</div>
<div id="right" align="center">
    <asp:Panel ID="Panel1" runat="server" BorderColor="#3366FF" BorderStyle="None" 
        HorizontalAlign="Center" >
    <asp:DetailsView ID="DetailsView1" runat="server" 
            DataSourceID="SqlDataSource_agent_userinfo" AutoGenerateRows="False" 
            DataKeyNames="账号,身份证号码" HorizontalAlign="Center">
        <AlternatingRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <Fields>
            <asp:BoundField DataField="账号" HeaderText="账号" ReadOnly="True" 
                SortExpression="账号" />
            <asp:BoundField DataField="身份证号码" HeaderText="身份证号码" SortExpression="身份证号码" 
                ReadOnly="True" />
            <asp:BoundField DataField="姓名" HeaderText="姓名" SortExpression="姓名" />
            <asp:BoundField DataField="性别" HeaderText="性别" SortExpression="性别" 
                ReadOnly="True" />
            <asp:BoundField DataField="出生日期" HeaderText="出生日期" 
                SortExpression="出生日期" />
            <asp:BoundField DataField="代理学校" HeaderText="代理学校" 
                SortExpression="代理学校" ReadOnly="True" />
            <asp:BoundField DataField="联系电话" HeaderText="联系电话" 
                SortExpression="联系电话" />
        </Fields>
        <InsertRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <PagerStyle BorderStyle="Groove" Wrap="True" />
        <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:DetailsView>
        <asp:SqlDataSource ID="SqlDataSource_agent_userinfo" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnString %>" 
            
            
            SelectCommand="SELECT DISTINCT agentID AS '账号', IDcard AS '身份证号码', name AS '姓名', CASE sex WHEN 0 THEN '男' WHEN 1 THEN '女' ELSE '错误' END AS '性别', birthday AS '出生日期', (SELECT SchoolName FROM SchoolTable WHERE (SchoolId = AgentView.SchoolId)) AS '代理学校', telephonenumber AS '联系电话' FROM AgentView WHERE (agentID = @agentID)">
            <SelectParameters>
                <asp:SessionParameter Name="agentID" SessionField="userId" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
   <!--   <table id="userinfo"  >
        
    	<tr>
    		<td>
                <asp:Label ID="Label1" runat="server" Text="用户名:"></asp:Label></td>
            <td style="visibility: hidden">
                <asp:Label ID="Label_user_account" runat="server" Text="xxxx"></asp:Label></td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label_user_name" runat="server" Text="真实姓名:"></asp:Label></td>
            <td>
                <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label></td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label_user_school" runat="server" Text="归属学校:"></asp:Label></td>
            <td>
                <asp:Label ID="Label6" runat="server" Text="Label"></asp:Label></td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label_user_sex" runat="server" Text="性别:"></asp:Label></td>
            <td>
                <asp:Label ID="Label8" runat="server" Text="Label"></asp:Label></td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label_user_birthday" runat="server" Text="出生日期:"></asp:Label></td>
            <td>
                <asp:Label ID="Label10" runat="server" Text="Label"></asp:Label></td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label1_user_idcard" runat="server" Text="身份证号:"></asp:Label></td>
            <td>
                <asp:Label ID="Label12" runat="server" Text="Label"></asp:Label></td>
    	</tr>
    </table>-->
    </asp:Panel>
    
    <asp:Panel ID="Panel2" runat="server" Visible="False" >
    <table id="Table1">
    	<tr>
    		<td>
                <asp:Label ID="Label13" runat="server" Text="请输入旧密码:"></asp:Label></td>
            <td>
                <asp:TextBox ID="TextBox_oldpsw" runat="server" MaxLength="16" 
                    TextMode="Password" ></asp:TextBox>
                </td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label15" runat="server" Text="请输入新密码:"></asp:Label></td>
            <td>
                <asp:TextBox ID="TextBox_newpsw" runat="server" MaxLength="16" 
                    TextMode="Password"></asp:TextBox> </td>
    	</tr>
        <tr>
    		<td>
                <asp:Label ID="Label17" runat="server" Text="请确认新密码:"></asp:Label></td>
            <td>
              <asp:TextBox ID="TextBox_okpsw" runat="server" MaxLength="16" 
                    TextMode="Password"  ></asp:TextBox> </td>
    	</tr>
     
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="Button_ok" runat="server" onclick="Button_ok_Click" 
                    Text="确定修改" />
            </td>
        </tr>
     
    </table>
    </asp:Panel>
</div>

</div>
</asp:Content>

